/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						 attack.h

	$Header: /heroes4/attack.h $

	$NoKeywords: $

 ************************************************************************/

#if !defined( ATTACK_H_INCLUDED )
#define ATTACK_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "combat_creature_ptr.h"
#include "combat_object_ptr.h"

class t_battlefield;
// ----------------------------------------------------------
// record details of an attack for later resolution
// ----------------------------------------------------------
class t_attack
{
public:
	t_attack( t_battlefield&			battlefield, 
			  t_combat_creature*		attacker,
			  t_abstract_combat_object*	defender, 
			  bool						ranged, 
		      int						damage );
	void check_vampirism();
	void resolve();
protected:
	void check_random_curse();
	void check_stone_gaze();

	t_combat_creature_ptr	m_attacker;
	t_battlefield&			m_battlefield;
	int						m_damage;
	t_combat_object_ptr		m_defender;
	int						m_number_of_attackers; // when attack started
	bool					m_ranged;
};

#endif // ATTACK_H_INCLUDED